﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BlockList : MonoBehaviour {
    private static Dictionary<byte, Block> blocks = new Dictionary<byte, Block> ();

    void Awake () {
        Block block = new Block (1, "dirt", 2, 31);
        blocks.Add (block.id, block);

        Block grass = new Block (2, "Grass", 3, 31, 0, 31, 2, 31);
        blocks.Add (grass.id, grass);
    }

    public static Block GetBlock (byte id) {
        return blocks.ContainsKey (id) ? blocks[id] : null;
    }
}